functor TypeCheckMain (S : TYPE_CHECK_MAIN_STRUCTS) : TYPE_CHECK_MAIN =
struct
  open S
  
  structure Table = Table
                           
  structure TypeCheck = TypeCheck (structure Table = Table
                                   structure Ast = Ast
                                   structure Ir = Ir
                                   structure Types2 = Types2)
  
  open TypeCheck
  
  fun typeCkProg ast = 
      (RetCheck.ckTop ast; TyCheck.ckTop ast
      )
end